import React from 'react'
import {
    View,
    Text,
    Image,
    TouchableOpacity,
    TextInput,
    StyleSheet,
}from 'react-native'

import BasePage from '../BasePage'
import NavigationBar from 'teaset/components/NavigationBar/NavigationBar';
import PageView from "../Component/Common/PageView";


export default class ShareManagerPage extends BasePage{



    constructor(props) {
        super(props);
        this.state = {
            ...this.state,

            isshow: false

        };

    }


    componentWillMount() {


        this.showLoad(true)
        setTimeout(this.openApp.bind(this), 2000);
    }

    openApp() {
        this.showLoad(false)

        this.setState({
            isshow: true
        })
    }
    renderNavigationBar() {
        return (
            <NavigationBar
                style={{backgroundColor: 'white',}}

                title={
                    <View style={{
                        flexDirection: 'row',
                        justifyContent: 'center',
                        alignSelf: 'center',

                    }}>
                        <Text style={{
                            fontSize: 20,
                            color: '#333333'
                        }}>分享列表</Text>
                    </View>}

                leftView={<TouchableOpacity
                    onPress={() => {


                        this.navigator.pop();


                        // DeviceEventEmitter.emit('my', {text: '刷新'})

                    }}
                >
                    <Image style={{width: 15, height: 15, marginLeft: 20}} source={require('../images/btn_back.png')}/>

                </TouchableOpacity>}

            />

        );
    }

    renderPage(){
        return (

            <PageView style={{
                flex: 1
            }} hiddenNav={true} fromPage={this} {...this.state}>

                {
                    this.state.isshow ?
                        <View style={{
                            flex: 1, justifyContent: 'center', flexDirection: 'column',
                            alignItems: 'center', backgroundColor: '#eeeeee'
                        }}>
                            <Image style={{width: 60, height: 60,}} source={require('../images/nodata.png')}/>
                            <Text style={{
                                fontSize: 18,
                                marginTop: 13
                            }}>没有分享</Text>
                        </View>
                        :null
                }

            </PageView>
        );
    }
}